/**
 *
 * User: rendong
 * Date: 12-9-3
 * Time: 下午8:42
 * $Id: Test.js 8 2012-09-03 14:57:25Z rendong237@gmail.com $
 */

function Test(){
    //this.eventtest();

    this.disptest();
}

Test.prototype.name = "Test";

Test.prototype.disptest = function()
{
    var disp = new GDisplayObject();
}


Test.prototype.eventtest = function (){
    var eventd = new GEventDispatcher();

    eventd.addEventListener("test", this.callback, this);
    eventd.addEventListener("test2", this.callback);
    eventd.addEventListener("test3", this.callback,this);
    eventd.addEventListener("test3", this.callback);

    console.log(eventd._events);

    eventd.removeEventListener("test", this.callback, this);

    console.log(eventd._events);
    eventd.dispatchEvent( new GEvent("test3"));
}

Test.prototype.callback = function(e){
    console.log(this.name, e.type);
}